Skip to content

feat: allow canister_info to be invoked via query calls - #346

Open
mraszyk wants to merge 2 commits into
mainfrom
docs/canister-info-query-calls
Open

feat: allow canister_info to be invoked via query calls#346
mraszyk wants to merge 2 commits into
mainfrom
docs/canister-info-query-calls

Conversation

@mraszyk

@mraszyk mraszyk commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The management canister method canister_info can now be invoked via non-replicated (query) calls by external users and from composite query methods, in addition to inter-canister calls. It remains rejected for ingress messages. Retrieving canister information is not subject to any access control.

Interface spec 0.67.0. The management canister method `canister_info` can
now be invoked via non-replicated (query) calls by external users and from
composite query methods, in addition to inter-canister calls. It remains
rejected for ingress messages. Retrieving canister information is not
subject to any access control.

Integrated with the composite query support added in 0.66.0: `canister_info`
is handled as a case of `management_canister_query` rather than as a
separate code path in `composite_query_helper`.
@github-actions github-actions Bot added the interface-spec Changes to the IC interface specification label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

🤖 Here's your preview: https://k7oic-piaaa-aaaam-ai7uq-cai.icp0.io

Comment thread docs/references/ic-interface-spec/changelog.md Outdated
@mraszyk
mraszyk marked this pull request as ready for review August 31, 2026 19:57
@mraszyk
mraszyk requested review from a team as code owners August 31, 2026 19:57
if A.num_requested_changes = null then From = |S.canister_history[A.canister_id].recent_changes|
else From = max(0, |S.canister_history[A.canister_id].recent_changes| - A.num_requested_changes)
End = |S.canister_history[A.canister_id].recent_changes| - 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need A.canister_id ∈ dom(S.canisters)?

The IC management canister address is `aaaaa-aa` (i.e. the empty blob).

It is possible to use the management canister via external requests (a.k.a. ingress messages). The cost of processing that request is charged to the canister that is being managed. Most methods only permit the controllers to call them. Calls to `raw_rand` and `deposit_cycles` are never accepted as ingress messages.
It is possible to use the management canister via external requests (a.k.a. ingress messages). The cost of processing that request is charged to the canister that is being managed. Most methods only permit the controllers to call them. Calls to `raw_rand`, `deposit_cycles`, and `canister_info` are never accepted as ingress messages (but `canister_info` can be invoked via query calls, see [IC method `canister_info`](#ic-canister_info)).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth mentioning canister_metadata can't be called with an ingress either (could also be done in a separate PR) (source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface-spec Changes to the IC interface specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants